package com.jnks.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jnks.constant.R;
import com.jnks.pojo.domain.vo.DroneSelectRequestVo;
import com.jnks.pojo.entity.DroneTDO;
import com.jnks.service.DailyMonitorService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 日常监测
 *
 * @author Ryo
 * @since 2024-04-09
 */
@Slf4j
@RestController
@RequestMapping("/vehicle/daily")
public class DailyMonitorController {

    @Autowired
    private DailyMonitorService dailyMonitorService;

    /**
     * 侦测数
     * @return
     */
    @GetMapping("/getMonite")
    public R getStatistics() {
        return R.data(dailyMonitorService.getStatistics());
    }

    /**
     * 日常侦测无人机列表&&历史回放无人机列表
     * @param vo
     * @return
     */
    @PostMapping("/list")
    public IPage<DroneTDO> hisDroneList(@RequestBody DroneSelectRequestVo vo) {
        return dailyMonitorService.hisDroneList(vo);
    }

}

